From: Daeho Ro <40587651+daeho-ro@users.noreply.github.com> Date: Thu, 30 Apr 2026 10:13:45 +0000 (+0900) Subject: Add x11 on linux when vtk 9.6+ X-Git-Tag: archive/raspbian/1.15.1+dfsg-4+rpi1^2^2~1 X-Git-Url: https://dgit.raspbian.org/%22http://www.example.com/cgi/%22/%22http:/www.example.com/cgi/%22?a=commitdiff_plain;h=9ee55f8fd6e83fc566e5862236c61679e9b213a0;p=pcl.git Add x11 on linux when vtk 9.6+ Gbp-Pq: Name 0005-Add-x11-on-linux-when-vtk-9.6.patch --- diff --git a/visualization/CMakeLists.txt b/visualization/CMakeLists.txt index 6e6ce0c7..f8a0ded6 100644 --- a/visualization/CMakeLists.txt +++ b/visualization/CMakeLists.txt @@ -140,6 +140,11 @@ endif() target_link_libraries("${LIB_NAME}" pcl_common pcl_io pcl_kdtree pcl_geometry pcl_search ${OPENGL_LIBRARIES}) +if(${VTK_VERSION} VERSION_GREATER_EQUAL 9.6 AND UNIX AND NOT ANDROID AND NOT APPLE AND NOT APPLE_IOS) + find_package(X11 REQUIRED) + target_link_libraries("${LIB_NAME}" ${X11_LIBRARIES}) +endif() + if(${VTK_VERSION} VERSION_GREATER_EQUAL 9.0) #Some libs are referenced through depending on IO target_link_libraries("${LIB_NAME}"